<?php
use Phalcon\Loader;

/**
 * Very simple MVC structure
 */

require_once __DIR__ . '/../Web/site.php';
if (!isset($site[$_SERVER['HTTP_HOST']])) {
    header('HTTP/1.1 404 Not Found');
    header("status: 404 Not Found");
} else {
    require __DIR__ . '/../vendor/autoload.php';
    require __DIR__ . '/../Core/Loader.php';
    $loader = new \Core\Loader();
    $loader->register();
    //加载网站所属类别
    $siteType = include __DIR__ . '/../Web/' . $site[$_SERVER['HTTP_HOST']] . '/config/type.php';
    // 注册服务
    include __DIR__ . '/../Core/bootstrap/' . $siteType . '.php';
}
